package com.rpay.web.controller.feedback;

import com.rpay.common.vo.PcsResult;
import com.rpay.web.interceptor.authentic.AccessControl;
import com.rpay.web.interceptor.authentic.AccessControlType;
import com.rpay.web.service.FeedbackService;
import com.rpay.web.param.PostFeedback;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author XXX
 * @mail XXX@hotmail.com
 * @date 2018/5/12
 * @Description:用户反馈
*/
@RestController
@RequestMapping(value = "api/feedback")
@AccessControl(type = AccessControlType.SECRET)
public class FeedbackController {
    @Autowired
    private FeedbackService feedbackService;
    @PostMapping(value = "")
    public PcsResult add(@Validated @RequestBody PostFeedback postFeedback) {
        feedbackService.add(postFeedback);
        return new PcsResult();
    }

}
